﻿using CrystalDecisions.CrystalReports.Engine;

namespace CSharpHelpers.Reports
{
    class ReportHelper
    {
        /// <summary>
        /// 設置報表的文本框
        /// </summary>
        /// <param name="name"></param>
        /// <param name="value"></param>
        public static void SetReportTextObject(ReportClass report, string name, string value)
        {
            TextObject textObject = (TextObject)report.ReportDefinition.ReportObjects[name];
            if (textObject != null)
            {
                textObject.Text = value;
            }
        }
    }
}
